﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MatchDisp.Util
{
    public class StringUtil
    {
        public static string TXT_FILTER = "Text|*.txt";
        public static string IMAGE_FILTER = "Image File|*.jpg;*.jpeg;*.bmp;*.gif;*.png";
        public static char[] WHITE_CHAR = " \r\n\t".ToCharArray();
        public static char[] WHITE_CHAR_DOT = " \r\n\t,".ToCharArray();

        public static string GetPrefix(string Str, string Sap)
        {
            int idx = Str.LastIndexOf(Sap);
            return Str.Substring(0, idx);
        }

        public static string GetSurfix(string Str, string Sap)
        {
            int idx = Str.LastIndexOf(Sap);
            return Str.Substring(idx + 1);
        }
    }
}
